{% extends "blog/base.html" %}

{% load i18n %}
{% load humanize %}
{% load comments_tag %}
{% load tagging_tags %}
{% load blog %}
{% load blog_tags %}

{% block head_title %}{% blocktrans %}Blog Post{% endblocktrans %} : {{ post.title }}{% endblock %}

{% block extra_head %}
    <link rel="alternate" type="application/atom+xml" title="Blog Post Feed for All Users" href="/feeds/posts/all/" />
    <link rel="alternate" type="application/atom+xml" title="Blog Post Feed for User {{ post.author.username }}" href="/feeds/posts/only/{{ post.author.username }}/" />
{% endblock %}

{% block body %}
    
    <div class="blog-post">
        <h2>{{ post.title }}</h2>
        <div class="blog-meta"><p>Posted by: <a href="{% url profiles.views.profile post.author.username %}">{{ post.author.username }}</a> on {{ post.publish|date }}</p></div>
        <div class="blog-tags">
            <p><img src="/site_media/comment.png" border="0" class="noborder" align="absmiddle" />
            {% tags_for_object post as tags %}
            {% for tag in tags %}
                <a href="/tags/{{ tag }}">{{ tag }}</a>
            {% endfor %}</p>
            {% ifequal post.author request.user %}
                <form action="{% url blog_edit post.id %}" method="GET">
                        <input type="submit" value="{% trans "Edit Post" %}" />
                </form>
            {% endifequal %}
        </div>
        
        {% render_content post 'body' %}
        
    </div>
    
    <h3>Comments on This Post:</h3>
    {% comments post %}
{% endblock %}
